package live.zs.prometheusexample.controller;

import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author madison
 * @description
 * @date 2021/5/13 17:05
 */
@RestController
@RequestMapping("demo")
public class IndexController {

    @GetMapping("index/{str}")
    public ResponseEntity<String> index(@PathVariable String str) {
        return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(str);
    }
}
